gtk4.git
8 years agofix a few documentation problems
Timm Bäder [Wed, 5 Jul 2017 12:13:41 +0000 (14:13 +0200)]
fix a few documentation problems

8 years agocenterbox: Add some missing return value annotations
Timm Bäder [Wed, 5 Jul 2017 11:09:32 +0000 (13:09 +0200)]
centerbox: Add some missing return value annotations

8 years agobox: Ignore baselines when vertical
Timm Bäder [Wed, 5 Jul 2017 09:09:27 +0000 (11:09 +0200)]
box: Ignore baselines when vertical

For now.

8 years agobbox: Don't report a horizontal baseline
Timm Bäder [Wed, 5 Jul 2017 06:31:15 +0000 (08:31 +0200)]
bbox: Don't report a horizontal baseline

8 years agowidget: Propagate correct baseline
Timm Bäder [Tue, 4 Jul 2017 17:02:04 +0000 (19:02 +0200)]
widget: Propagate correct baseline

8 years agowidget: Always pass on baselines
Timm Bäder [Tue, 4 Jul 2017 17:00:00 +0000 (19:00 +0200)]
widget: Always pass on baselines

8 years agowidget: Simplify snapshot_child
Timm Bäder [Tue, 4 Jul 2017 13:41:27 +0000 (15:41 +0200)]
widget: Simplify snapshot_child

8 years agoentry: Fix baseline alignment
Timm Bäder [Tue, 4 Jul 2017 13:22:58 +0000 (15:22 +0200)]
entry: Fix baseline alignment

Since we only look at priv->text_baseline later on, it would be useful
to actually set it to a useful value.

8 years agowidget: Draw debug nodes for widget margins too
Timm Bäder [Tue, 4 Jul 2017 13:06:18 +0000 (15:06 +0200)]
widget: Draw debug nodes for widget margins too

8 years agowidget: Fix copy&paste error when creating debug nodes
Timm Bäder [Tue, 4 Jul 2017 12:59:02 +0000 (14:59 +0200)]
widget: Fix copy&paste error when creating debug nodes

8 years agosizerequest: Add more assertions for baselines
Timm Bäder [Tue, 4 Jul 2017 09:35:06 +0000 (11:35 +0200)]
sizerequest: Add more assertions for baselines

min baselines must be <= natural baselines and both must lie inside the
content size of the widget.

8 years agowidget: Unset PRELIGHT and ACTIVE state flags in unmap
Timm Bäder [Sun, 2 Jul 2017 18:46:31 +0000 (20:46 +0200)]
widget: Unset PRELIGHT and ACTIVE state flags in unmap

8 years agobutton: Reset in_button state in unmap
Timm Bäder [Sun, 2 Jul 2017 18:45:23 +0000 (20:45 +0200)]
button: Reset in_button state in unmap

Since at that point the point is clearly not in the button anymore.

8 years agolabel: Fix get_layout_index
Timm Bäder [Sun, 2 Jul 2017 12:16:09 +0000 (14:16 +0200)]
label: Fix get_layout_index

Properly translate the given coordinates to layout coordinates. Fixes
clicking links and selecting text.

8 years agotextview: Invalidate entire widget
Timm Bäder [Sun, 2 Jul 2017 07:00:15 +0000 (09:00 +0200)]
textview: Invalidate entire widget

8 years agotextview: Remove size_changed check in size-allocate
Timm Bäder [Sun, 2 Jul 2017 06:29:07 +0000 (08:29 +0200)]
textview: Remove size_changed check in size-allocate

It's broken and we only hit size-allocate when the size changes anyway.

8 years agolinkbutton: Remove useless unrealize implementation
Timm Bäder [Sat, 1 Jul 2017 17:21:10 +0000 (19:21 +0200)]
linkbutton: Remove useless unrealize implementation

8 years agostack: Fix under transitions
Timm Bäder [Sat, 1 Jul 2017 17:15:01 +0000 (19:15 +0200)]
stack: Fix under transitions

make sure we initialize both width and height with proper values.

8 years agoeventbox: Remove window
Timm Bäder [Sat, 1 Jul 2017 16:16:24 +0000 (18:16 +0200)]
eventbox: Remove window

8 years agocenterbox: Avoid accessing unset widgets
Timm Bäder [Sat, 1 Jul 2017 16:15:41 +0000 (18:15 +0200)]
centerbox: Avoid accessing unset widgets

8 years agotextview: Use correct size for cairo node bounds
Timm Bäder [Sat, 1 Jul 2017 06:47:51 +0000 (08:47 +0200)]
textview: Use correct size for cairo node bounds

8 years agowindow: Move updates debugging to GtkWidget
Timm Bäder [Fri, 30 Jun 2017 12:01:59 +0000 (14:01 +0200)]
window: Move updates debugging to GtkWidget

Which has the necessary information.

8 years agoscale: Fix mark positions
Timm Bäder [Fri, 30 Jun 2017 11:40:23 +0000 (13:40 +0200)]
scale: Fix mark positions

Someone else will have to fix the css.

8 years agorange: Fix get_range_rect
Timm Bäder [Fri, 30 Jun 2017 11:21:06 +0000 (13:21 +0200)]
range: Fix get_range_rect

get_own_allocation's position is relative to the given widget's origin,
not the parent.

8 years agorange: Fix mark positions
Timm Bäder [Fri, 30 Jun 2017 11:10:32 +0000 (13:10 +0200)]
range: Fix mark positions

The values returned by gtk_range_compute_slider_position are relative
to the trough_widget (the slider's parent), not the slider widget
itself.

8 years agoscale: Remove custom indicator drawing
Timm Bäder [Fri, 30 Jun 2017 11:08:00 +0000 (13:08 +0200)]
scale: Remove custom indicator drawing

it's a css node so we can simply use the background instead of the
foreground color in the theme.

8 years agoscale: Fix mark indicator allocations
Timm Bäder [Fri, 30 Jun 2017 10:40:40 +0000 (12:40 +0200)]
scale: Fix mark indicator allocations

8 years agoheaderbar: don't measure own size
Timm Bäder [Fri, 30 Jun 2017 09:49:41 +0000 (11:49 +0200)]
headerbar: don't measure own size

This is fallout from an earlier commit, we should be checking the
child's size of course, not repeatedly the headerbar's.

8 years agolevelbar: Don't underallocate block widgets
Timm Bäder [Thu, 29 Jun 2017 13:28:47 +0000 (15:28 +0200)]
levelbar: Don't underallocate block widgets

8 years agorange: Avoid division by zero
Timm Bäder [Thu, 29 Jun 2017 13:28:24 +0000 (15:28 +0200)]
range: Avoid division by zero

8 years agogtk4-demo: Add widgetbowl demo
Timm Bäder [Thu, 29 Jun 2017 10:18:40 +0000 (12:18 +0200)]
gtk4-demo: Add widgetbowl demo

Same as fishbowl, but with widgets

8 years agopopover: set the shape on the correct window
Timm Bäder [Wed, 28 Jun 2017 14:19:22 +0000 (16:19 +0200)]
popover: set the shape on the correct window

the parent window is now the toplevel's window.

8 years agoswitch: Put the slider node last
Timm Bäder [Wed, 28 Jun 2017 13:57:42 +0000 (15:57 +0200)]
switch: Put the slider node last

Makes sense since we draw it over both labels. Also make this obvious by
using the default snapshot implementation.

8 years agodrawingarea: Remove useless line from code example
Timm Bäder [Wed, 28 Jun 2017 09:17:03 +0000 (11:17 +0200)]
drawingarea: Remove useless line from code example

backgrounds are drawn automatically now.

8 years agoFix a few allocation coordinates & sizes
Timm Bäder [Wed, 28 Jun 2017 06:19:35 +0000 (08:19 +0200)]
Fix a few allocation coordinates & sizes

8 years agoentry: Fix undershoot position
Timm Bäder [Wed, 28 Jun 2017 05:46:46 +0000 (07:46 +0200)]
entry: Fix undershoot position

8 years agopaned: Fix clip node coordinates
Timm Bäder [Wed, 28 Jun 2017 05:38:54 +0000 (07:38 +0200)]
paned: Fix clip node coordinates

8 years agoadwaita: Adjust entry progress styling
Timm Bäder [Wed, 28 Jun 2017 05:25:34 +0000 (07:25 +0200)]
adwaita: Adjust entry progress styling

Now that the entry>progress node is a full GtkProgressBar, we need to
apply the style to its trough>progress node.

8 years agoentry: Simplify progress size allocation
Timm Bäder [Wed, 28 Jun 2017 05:25:23 +0000 (07:25 +0200)]
entry: Simplify progress size allocation

8 years agocalendar: Remove all input windows
Timm Bäder [Tue, 27 Jun 2017 18:48:14 +0000 (20:48 +0200)]
calendar: Remove all input windows

and simultaneously fix input! \o/

8 years agoentry: Fix text position
Timm Bäder [Tue, 27 Jun 2017 18:28:15 +0000 (20:28 +0200)]
entry: Fix text position

We need to adjust the layout coordinates depending on priv->text_x,
sinec that one accounts for the width of the left icon.

8 years agotreeview: Remove bin_window
Timm Bäder [Tue, 27 Jun 2017 17:53:59 +0000 (19:53 +0200)]
treeview: Remove bin_window

8 years agolabel: Use the correct size in snapshot()
Timm Bäder [Tue, 27 Jun 2017 15:12:00 +0000 (17:12 +0200)]
label: Use the correct size in snapshot()

8 years agoaboutdialog: Remove unused image
Timm Bäder [Tue, 27 Jun 2017 14:57:25 +0000 (16:57 +0200)]
aboutdialog: Remove unused image

8 years agotestbaseline: Add a horizontal spinbutton
Timm Bäder [Tue, 27 Jun 2017 12:36:29 +0000 (14:36 +0200)]
testbaseline: Add a horizontal spinbutton

8 years agoFix baselines wrt css values
Timm Bäder [Tue, 27 Jun 2017 11:27:58 +0000 (13:27 +0200)]
Fix baselines wrt css values

The reported minimum baseline is for the reported min height, but if the
css min-height is greater than that, we need to account for that fact
when saving the baseline.

Since the reported baseline is relative to the widget's origin, we also
need to add the top values for margin, border and padding to the
reported baseline.

8 years agowidget: black is the new red
Timm Bäder [Tue, 27 Jun 2017 10:28:25 +0000 (12:28 +0200)]
widget: black is the new red

8 years agonotebook: Fix css node ordering
Timm Bäder [Tue, 27 Jun 2017 09:44:22 +0000 (11:44 +0200)]
notebook: Fix css node ordering

Aaand all the unit tests pass again.

8 years agoiconview: Remove bin_window
Timm Bäder [Tue, 27 Jun 2017 09:11:57 +0000 (11:11 +0200)]
iconview: Remove bin_window

8 years agoentry: Fix node ordering
Timm Bäder [Mon, 26 Jun 2017 12:50:48 +0000 (14:50 +0200)]
entry: Fix node ordering

Fix the icon order

8 years agotestsuite: Update expected css node output
Timm Bäder [Mon, 26 Jun 2017 12:23:36 +0000 (14:23 +0200)]
testsuite: Update expected css node output

8 years agopaned: Remove assertion in get_child_property
Timm Bäder [Mon, 26 Jun 2017 10:02:17 +0000 (12:02 +0200)]
paned: Remove assertion in get_child_property

Passing the third child (the pane separator) is possible and shouldn't
cause the process to abort.

8 years agomain: Protect against non-GtkWindow toplevels
Timm Bäder [Mon, 26 Jun 2017 10:00:20 +0000 (12:00 +0200)]
main: Protect against non-GtkWindow toplevels

8 years agoinspector: Use GtkWidget::pick when picking widgets
Timm Bäder [Mon, 26 Jun 2017 09:48:33 +0000 (11:48 +0200)]
inspector: Use GtkWidget::pick when picking widgets

8 years agocontainer: Remove get_children_clip
Timm Bäder [Sun, 25 Jun 2017 17:01:41 +0000 (19:01 +0200)]
container: Remove get_children_clip

Unused.

8 years agostack: Compute clip directly
Timm Bäder [Sun, 25 Jun 2017 17:00:30 +0000 (19:00 +0200)]
stack: Compute clip directly

8 years agobuttonbox: Compute clip directly
Timm Bäder [Sun, 25 Jun 2017 16:55:42 +0000 (18:55 +0200)]
buttonbox: Compute clip directly

8 years agomodelbutton: Compute clip directly
Timm Bäder [Sun, 25 Jun 2017 16:51:31 +0000 (18:51 +0200)]
modelbutton: Compute clip directly

8 years agoflowbox: Compute clip directly
Timm Bäder [Sun, 25 Jun 2017 16:51:23 +0000 (18:51 +0200)]
flowbox: Compute clip directly

8 years agospinbutton: Fix gesture state
Timm Bäder [Sun, 25 Jun 2017 16:27:10 +0000 (18:27 +0200)]
spinbutton: Fix gesture state

We claimed the gesture previously to keep it from propagating to the
underlying entry, but now that the entry is in a box with the two
buttons, we can do this properly and restore the previous long-press
behavior.

8 years agocheckmenuitem: Fix indicator state
Timm Bäder [Sat, 24 Jun 2017 05:47:55 +0000 (07:47 +0200)]
checkmenuitem: Fix indicator state

We need to remove the inconsistent and checked state first so we
actually remove it.

8 years agowidget-factory: Show the status bar by default
Timm Bäder [Sat, 24 Jun 2017 05:46:19 +0000 (07:46 +0200)]
widget-factory: Show the status bar by default

Since the action is also active by default.

8 years agotestnotebookdnd: quit when the toplevel gets closed
Timm Bäder [Fri, 23 Jun 2017 18:33:52 +0000 (20:33 +0200)]
testnotebookdnd: quit when the toplevel gets closed

8 years agomenu: Popup at window coordinates if widget is given
Timm Bäder [Wed, 21 Jun 2017 19:31:08 +0000 (21:31 +0200)]
menu: Popup at window coordinates if widget is given

Since widget allocations are now relative to the parent's origin, we
need to pass the window allocation here.

8 years agowindow: Don't use allocated size in snapshot
Timm Bäder [Wed, 21 Jun 2017 15:54:47 +0000 (17:54 +0200)]
window: Don't use allocated size in snapshot

Those are the wrong values.

8 years agopopover: Create subsurface on wayland
Timm Bäder [Wed, 21 Jun 2017 11:25:41 +0000 (13:25 +0200)]
popover: Create subsurface on wayland

8 years agowidget: Fix drawing invalidation with windowed widgets
Timm Bäder [Wed, 21 Jun 2017 10:15:47 +0000 (12:15 +0200)]
widget: Fix drawing invalidation with windowed widgets

E.g. popovers. Find the parent of the given widget with the window and
invalidate the given region in that window.

8 years agopopover: "Fix" child allocation
Timm Bäder [Wed, 21 Jun 2017 10:14:00 +0000 (12:14 +0200)]
popover: "Fix" child allocation

This is still wrong but will be fixed in the future.

8 years agowindow: Stop wrapping popovers in another window
Timm Bäder [Wed, 21 Jun 2017 09:49:53 +0000 (11:49 +0200)]
window: Stop wrapping popovers in another window

GtkPopover is already a windowed widget.

8 years agoReplace a few get_content_allocation calls with get_content_size
Timm Bäder [Sun, 18 Jun 2017 13:45:42 +0000 (15:45 +0200)]
Replace a few get_content_allocation calls with get_content_size

The position of the content allocation is almost never relevant since
it's 0/0 for measure, size_allocate and snapshot.

8 years agoRemove all widget style property code
Timm Bäder [Sun, 18 Jun 2017 11:17:00 +0000 (13:17 +0200)]
Remove all widget style property code

8 years agotreeviewaccessible: Don't rely on nonexistent style properties
Timm Bäder [Sun, 18 Jun 2017 10:54:27 +0000 (12:54 +0200)]
treeviewaccessible: Don't rely on nonexistent style properties

The expander-size style property has been gone for a long time.

8 years agoadwaita: Remove style properties
Timm Bäder [Sun, 18 Jun 2017 10:52:20 +0000 (12:52 +0200)]
adwaita: Remove style properties

They don't exist anymore.

8 years agonotebook: Remove style properties
Timm Bäder [Sun, 18 Jun 2017 10:51:23 +0000 (12:51 +0200)]
notebook: Remove style properties

Hardcode the default values until someone comes up with a proposal for a
better way.

8 years agocalendar: Remove style properties
Timm Bäder [Sun, 18 Jun 2017 10:46:30 +0000 (12:46 +0200)]
calendar: Remove style properties

Hardcode the default values until someone comes and fixes the actual
widget.

8 years agowidget: Remove _set_simple_clip
Timm Bäder [Sun, 18 Jun 2017 10:29:59 +0000 (12:29 +0200)]
widget: Remove _set_simple_clip

Unused.

8 years agospinner: Use get_content_size
Timm Bäder [Sun, 18 Jun 2017 10:29:49 +0000 (12:29 +0200)]
spinner: Use get_content_size

8 years agopathbar: Compute widget clip directly
Timm Bäder [Sun, 18 Jun 2017 10:25:39 +0000 (12:25 +0200)]
pathbar: Compute widget clip directly

Instead of relying on gtk_widge_set_simple_clip

8 years agotoolitem: Remove size_allocate implementation
Timm Bäder [Sun, 18 Jun 2017 10:21:34 +0000 (12:21 +0200)]
toolitem: Remove size_allocate implementation

A GtkToolItem is a GtkBin and that already does exactly what this
implementation did.

8 years agowidget: Transform clips into right coordinate space
Timm Bäder [Sun, 18 Jun 2017 08:15:06 +0000 (10:15 +0200)]
widget: Transform clips into right coordinate space

The values passed to gtk_widget_set_clip are relative to the widget's
origin, but we need the values to be relative to priv->allocation.

8 years agopaned: Draw handle separator at the right location
Timm Bäder [Sun, 18 Jun 2017 08:13:11 +0000 (10:13 +0200)]
paned: Draw handle separator at the right location

8 years agopaned: Make sure we set the correct clips
Timm Bäder [Sun, 18 Jun 2017 08:10:51 +0000 (10:10 +0200)]
paned: Make sure we set the correct clips

They are still too big, i.e. clipped-off children enlarge the paned's
clip but at least redrawing works and smaller clips are just an
optimization.

8 years agoswitch: Remove in_switch flag
Timm Bäder [Sat, 17 Jun 2017 12:18:14 +0000 (14:18 +0200)]
switch: Remove in_switch flag

It's pretty simple and less code to just check whether the gesture
coords are inside the widget at the one place where we actually used the
flag.

8 years agowidget: Consider opacity when drawing toplevels
Timm Bäder [Sat, 17 Jun 2017 12:13:29 +0000 (14:13 +0200)]
widget: Consider opacity when drawing toplevels

This used to work in gtk3 and is used e.g. in the inspector when using
wayland.

8 years agoswitch: Fix handle dragging with padding applied
Timm Bäder [Sat, 17 Jun 2017 11:16:50 +0000 (13:16 +0200)]
switch: Fix handle dragging with padding applied

We only move the handle inside the content allocation, so we need to use
the content width when calculating the new handle_pos.

8 years agolayout: Remove bin_window
Timm Bäder [Sat, 17 Jun 2017 08:59:03 +0000 (10:59 +0200)]
layout: Remove bin_window

8 years agofixed: Remove window
Timm Bäder [Sat, 17 Jun 2017 08:55:47 +0000 (10:55 +0200)]
fixed: Remove window

8 years agobutton: Fix in_button checks
Timm Bäder [Sat, 17 Jun 2017 07:27:03 +0000 (09:27 +0200)]
button: Fix in_button checks

The gesture coords are relative to the button's origin, so use
gtk_widget_get_own_allocation to check if the coords are inside the
button.

8 years agoexpander: Fix pressed_in_title check
Timm Bäder [Sat, 17 Jun 2017 06:54:59 +0000 (08:54 +0200)]
expander: Fix pressed_in_title check

gesture coords are relative to the expander widget, the title allocation
is relative to the box child.

8 years agoRemove GtkCssGadget
Timm Bäder [Sat, 17 Jun 2017 06:19:30 +0000 (08:19 +0200)]
Remove GtkCssGadget

8 years agoiconhelper: Inherit from GObject
Timm Bäder [Sat, 17 Jun 2017 06:39:43 +0000 (08:39 +0200)]
iconhelper: Inherit from GObject

Nothing is using any gadget API on iconhelpers anymore.

8 years agospinbutton: Remove unused import
Timm Bäder [Sat, 17 Jun 2017 06:15:04 +0000 (08:15 +0200)]
spinbutton: Remove unused import

8 years agoscrolledwindow: Fix indicator hiding
Timm Bäder [Sat, 17 Jun 2017 06:08:18 +0000 (08:08 +0200)]
scrolledwindow: Fix indicator hiding

Only hiding the indicator if the widget is not mapped won't work.

8 years agocheckmenuitem: Fix indicator allocation
Timm Bäder [Sat, 17 Jun 2017 05:14:38 +0000 (07:14 +0200)]
checkmenuitem: Fix indicator allocation

base point is the menu item's content allocation now.

8 years agorange: Fix slider allocation
Timm Bäder [Fri, 16 Jun 2017 16:16:27 +0000 (18:16 +0200)]
range: Fix slider allocation

8 years agowidget: Add new allocation accessors
Timm Bäder [Fri, 16 Jun 2017 16:08:04 +0000 (18:08 +0200)]
widget: Add new allocation accessors

8 years agoRemove GtkCssCustomGadget
Timm Bäder [Fri, 16 Jun 2017 13:30:52 +0000 (15:30 +0200)]
Remove GtkCssCustomGadget

Unused.

8 years agoentry: Replace progress gadget with a progressbar
Timm Bäder [Fri, 16 Jun 2017 13:27:08 +0000 (15:27 +0200)]
entry: Replace progress gadget with a progressbar

8 years agoscrollbar: notify when setting the orientation
Timm Bäder [Fri, 16 Jun 2017 13:22:59 +0000 (15:22 +0200)]
scrollbar: notify when setting the orientation

8 years agoGtkAccelLabel: Add use-underline property
Timm Bäder [Fri, 16 Jun 2017 13:22:04 +0000 (15:22 +0200)]
GtkAccelLabel: Add use-underline property